package com.mastercard.assets;

public class MasterCardException
	extends
		Exception
{
	private int errorCode = -1 ;
	private String mes ;
	
	public MasterCardException( String message , int errorCode , Throwable t )
	{
		super( message , t ) ;
		this.errorCode = errorCode ;
		this.mes = message ;
	}
	
	public String getMessage( )
	{
		return "MasterCard (" + this.errorCode + "): " + super.getMessage( ) ;
	}
	
	public int getErrorCode( )
	{
		return errorCode ;
	}
	
	public String getSingularMessage( )
	{
		return ( ( mes == null ) ? "" : mes ) ;
	}
}
